Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: declare jest available if the binary exists in node_modules/.bin #130

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HendrikThePendric
Copy link

Perhaps a bit controversial, but at my work we have a test utility package which has Jest as a direct dependency. Because of this we do not include Jest as a (dev) dependency in the package.json files of our apps/libs. As a result I was unable to use the neotest-jest plugin successfully.

I was thinking that actually in order for Jest to run in a project, the only precondition is that the binary is available in node_modules/.bin/, so perhaps it makes more sense to check if that's the case instead of reading the package.json files.

This has fixed my issue, but perhaps there are some ramifications of this approach which I hadn't considered yet. If so feel free to close this PR.

If this does seem like a good general improvement, then some additional commits might be in order to remove the code that checks the package.json files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant